import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);

let store = new Vuex.Store({
	// 1. state
	state: {
		num: 2,
		indexTab: true,
		tabbarIndex: 0,
		tabbarIndex2: 0,
		tabbar: [
			{
				title: "",
				normalImg: "./static/images/footIco1.png",
				activeImg: "./static/images/footIco4.png",
				linkTo: "/index",
				active: false
			},
			{
				title: "",
				normalImg: "./static/images/footIco2.png",
				activeImg: "./static/images/footIco5.png",
				linkTo: "/message/all",
				active: false
			},
			{
				title: "",
				normalImg: "./static/images/footIco3.png",
				activeImg: "./static/images/footIco6.png",
				linkTo: "/my",
				active: false
			}
		],
		tabbar2: [
			{
				title: "",
				normalImg: "./static/images/footIco1.png",
				activeImg: "./static/images/footIco4.png",
				linkTo: "/anchor/index",
				active: false
			},
			{
				title: "",
				normalImg: "./static/images/footIco2.png",
				activeImg: "./static/images/footIco5.png",
				linkTo: "/anchor/message/all",
				active: false
			},
			{
				title: "",
				normalImg: "./static/images/footIco7.png",
				activeImg: "./static/images/footIco8.png",
				linkTo: "/anchor/ranking/liuliu",
				active: false
			},
			{
				title: "",
				normalImg: "./static/images/footIco3.png",
				activeImg: "./static/images/footIco6.png",
				linkTo: "/my",
				active: false
			}
		],
	},

	// // 2. getters
	getters: {

	},
	// 3. actions
	// 通常跟api接口打交道
	actions: {

	},
	// 4. mutations
	mutations: {
		add(state) {
			state.num += 1;
		},
		reduce(state) {
			state.num -= 1;
		}
	}
});

export default store;





